home *** CD-ROM | disk | FTP | other *** search
- package netscape.net;
-
- import java.io.IOException;
- import java.io.InputStream;
-
- public class URLInputStream extends InputStream {
- protected URLConnection connection;
- private byte[] temp = new byte[1];
-
- public URLInputStream(URLConnection var1) {
- this.connection = var1;
- }
-
- protected native void open() throws IOException;
-
- public int read() throws IOException {
- int var1 = this.read(this.temp, 0, 1);
- return var1 <= 0 ? -1 : this.temp[0] & 255;
- }
-
- public int read(byte[] var1, int var2, int var3) throws IOException {
- return this.read0(var1, var2, var3);
- }
-
- native int read0(byte[] var1, int var2, int var3) throws IOException;
-
- public native long skip(long var1) throws IOException;
-
- public native int available() throws IOException;
-
- public void close() throws IOException {
- this.connection.close();
- }
- }
-